/**
* @fileOverview 角色管理接口
* @author wind-lc
* @version 1.0
*/
import { get, post } from '@/request/http'

// 获取角色列表
const getPageHnRole = params => {
  return post(process.env.VUE_APP_CDHNTECH_API + '/hnRole/getPageHnRole', params)
}

// 删除角色
const deleteByPrimaryKey = params => {
  return post(process.env.VUE_APP_CDHNTECH_API + '/hnRole/deleteByPrimaryKey', params)
}
// 批量删除角色
const deleteBatch = params => {
  return post(process.env.VUE_APP_CDHNTECH_API + '/hnRole/deleteBatch', params)
}
// 新增角色
const insertSelective = params => {
  return post(process.env.VUE_APP_CDHNTECH_API + '/hnRole/insertSelective', params)
}
// 获取菜单权限
const getHnResourceList = params => {
  return get(process.env.VUE_APP_CDHNTECH_API + '/hnResource/getHnResourceList', params)
}
// 获取角色菜单权限
const getHnRoleById = params => {
  return get(process.env.VUE_APP_CDHNTECH_API + '/hnRole/getHnRoleById', params)
}
// 编辑角色
const updateByPrimaryKeySelective = params => {
  return post(process.env.VUE_APP_CDHNTECH_API + '/hnRole/updateByPrimaryKeySelective', params)
}

export { getPageHnRole, deleteByPrimaryKey, deleteBatch, insertSelective, getHnResourceList, getHnRoleById, updateByPrimaryKeySelective }
